import instance from '@/utils/request'
/**
 * 登录
 * @param {Object} data
 * @returns
 */
export function login(data) {
  return instance({
    url: '/sys/login',
    method: 'post',
    data
  })
}

export function getInfo() {
  return instance({
    url: '/sys/profile',
    method: 'get'
  })
}

export function logout() {
  return instance({
    url: '/vue-admin-template/user/logout',
    method: 'post'
  })
}

export function updatePassword(data) {
  return instance({
    url: '/sys/user/updatePass',
    method: 'put',
    data
  })
}
